# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=qt5-qtusb
pkgver=0.7.0
pkgrel=0
pkgdesc="Qt5 - a cross-platform USB Module for Qt."
url="https://github.com/fpoussin/QtUsb/"
arch="all"
license="LGPL-3.0-only"
options="!check" # at the moment "make install" is needed for it to work
makedepends="hidapi-dev libusb-dev qt5-qtbase-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/fpoussin/QtUsb/archive/v$pkgver.tar.gz
	qtnew.patch
	"
builddir="$srcdir/QtUsb-$pkgver"

build() {
	qmake-qt5
	make
}

check() {
	cd tests
	qmake-qt5
	make -i check TESTARGS="-o result.xml,xunitxml"
}

package() {
	make INSTALL_ROOT="$pkgdir" install
}

sha512sums="
e6b420cc38080f65590dd38422773d90819d10f9fad48ea3e72ec2565b616368dff483db986215392f47c7e90a3578bdd7fbd360e897939f07f75ccef686c353  qt5-qtusb-0.7.0.tar.gz
213bcf1a9c183b403e94e6c5d365d40681f996b87409cdaca9904187f3e439e7883f4cba322b77d7949b8300b7d442389fd53b7268b2ab6b20599b1436c0d4de  qtnew.patch
"
